<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "goods_category".
 *
 * @property int $cat_id 自增ID
 * @property int $merchant_id 取merchant
 * @property string $cat_name 分类名称
 * @property int $sort 排序
 * @property int $is_show 是否显示:1不显示,2显示
 *
 * @property Merchant $merchant
 */
class GoodsCategory extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'goods_category';
    }

    /**
     * Gets query for [[Merchant]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getMerchant()
    {
        return $this->hasOne(Merchant::className(), ['merchant_id' => 'merchant_id']);
    }
}
